#-------------------------------------------------------------------
# Project Invasion of the aliens 
# name game.py
# purpose main game loop
#
# authors Chris L'Heureux, Tyler Plante, Jackson Morse
# main author Chris L'Heureux
#
# created 12/3/12
# Copyright (C) Chris L'Heureux
# License New BSD\
#------------------------------------------------------------------  

import pygame, math, sys, random

class Background(pygame.sprite.Sprite):
    def __init__(self, position, screenSize):
        pygame.sprite.Sprite.__init__(self, self.containers)
        self.image = pygame.image.load("BackGrounds/redBackGround.png")
        self.rect = self.image.get_rect()
        self.realx = position[0]
        self.realy = position[1]
        self.xOffset = 0
        self.place(position)
        self.scrolling = False
     
    def place(self, position):
        self.rect.center = position
        #print "I've moved to", position
        
    def move(self):
        self.place([self.realx-self.xOffset, self.realy])
    
    def update(*args):
        self = args[0]
        self.xOffset = args[1]
        self.scrolling = args[3]
        self.move()